//
//  DKCalendarView.h
//  Whistle
//
//  Created by 258 on 2018/1/5.
//  Copyright © 2018年 BookSir. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "DKCalendarConfiguration.h"

@class DKCalendarView;

@protocol DKCalendarViewDelegate <NSObject>

@optional

- (BOOL)calendarView:(DKCalendarView *)calendarView willSelectDate:(NSDate *)date;
- (BOOL)calendarView:(DKCalendarView *)calendarView willDeselectDate:(NSDate *)date;

- (void)calendarView:(DKCalendarView *)calendarView didSelectDate:(NSDate *)date;
- (void)calendarView:(DKCalendarView *)calendarView didDeselectDate:(NSDate *)date;

@end

//////////////////////////////////////////

@interface DKCalendarView : UIView

- (instancetype)initWithConfiguration:(DKCalendarConfiguration *)configuration;

@property (nonatomic, strong, readonly) DKCalendarConfiguration *configuration;
@property (nonatomic, weak) id<DKCalendarViewDelegate> delegate;

- (void)updateConfiguration:(DKCalendarConfiguration *)configuration;

- (NSArray<NSDate *> *)selectedDates;

- (void)reset;

- (void)reload;

- (void)scrollToDate:(NSDate *)date animated:(BOOL)animated;

@end
